<?php
/**
  * Klasse XML
  * @param   : strXMLData, aData[]
  *
  * @info    : Erstellen des XML Strings
  *
  * @e.datum : 05.12.2010
  * @l.datum : 08.01.2010
  * @version : beta
 **/
class XMLData{

  private $strXMLData;
  private $aData;


  /**
    * Konstruktor XMLData
    * @param : $_SESSION Data
   **/
  public function __construct($Data){
    $this->strXMLData='';
    $this->aData=$Data;
  }


  /**
    * Destruktor XMLData
    * @param : ..
   **/
  public function  __destruct() {
    $this->strXMLData=null;
    $this->aData=null;
  }


  /**
    * Methode fuDataToXML -
    * @param : ..
    * @return: strXMLData
   **/
  public function fuDataToXML(){
    Model::getColForms();
    $this->strXMLData='<?xml version="1.0" encoding="UTF-8"?>';
    $this->strXMLData.='<Datensatz>';
    foreach($this->aData as $k => $v) {
      $this->strXMLData.='<'.$k.'>'.$v.'</'.$k.'>';
    }
    $this->strXMLData.='</Datensatz>';

    return $this->strXMLData;
    
  }

} // Class XMLData ..
?>
